---
layout: default
---

<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-99-y/jquery/1.2.3/jquery.min.js" type="application/javascript"></script>
<script>
/**
 * 分类展示（点击右侧的分类展示时，左侧的相关裂变展开或者收起）
 * @return {[type]} [description]
 */
function categoryDisplay() {
    /** only show All */
    $('.post-list-body>ul>div[post-cate!=All]').hide();
    /** show category when click categories list */
    $('.categories-list-item').click(function() {
        var cate = $(this).attr('cate');
        $('.post-list-body>ul>div[post-cate!=' + cate + ']').hide(250);
        $('.post-list-body>ul>div[post-cate=' + cate + ']').show(400);
        if(cate == 'All'){
            $('.pagination').show(400);
        }
    });
}
$(document).ready(function() {
    categoryDisplay();
});
</script>
<div class="page clearfix" index>
    <div class="left">
        <!--<h1>文章列表</h1>-->
        <small>站在云端，敲下键盘，望着通往世界另一头的那扇窗，只为做那读懂0和1的人。。</small>
        <hr>
        <div class="post-list-body">
            <ul>
                <div class="all-posts" post-cate="All">
                    {% for post in paginator.posts %}
                    <li>
                        <a class="post-link" style="font-size:20px;" href="{{ post.url }}">{{ post.title }}</a>
                        <hr style="margin: 12px 0">
                    </li>
                    {% endfor %}
                </div>
                <!-- 玄玉201805241800：预置各分类文章列表，供首页点击分类时动态显示 -->
                {% for category in site.categories %}
                    <div post-cate="{{category | first}}">
                        {% for posts in category %}
                            {% for post in posts %}
                                {% if post.url %}
                                    <li>
                                        <a class="post-link" style="font-size:20px;" href="{{ post.url }}">{{ post.title }}</a>
                                        <hr style="margin: 12px 0">
                                    </li>
                                {% endif %}
                            {% endfor %}
                        {% endfor %}
                    </div>
                {% endfor %}
            </ul>
            <!--
            <ul>
                {% for post in paginator.posts %}
                  <li>
                    <h2>
                      <a class="post-link" href="{{ post.url }}">{{ post.title }}</a>
                    </h2>
                    <div class="label">
                        博文发表日期
                        <div class="label-card">
                            <i class="fa fa-calendar"></i>{{ post.date | date: "%F" }}
                        </div>
                        博文作者（_posts文件夹下的md文章头部若定义了author则显示博文作者，否则不显示）
                        <div class="label-card">
                            {% if post.author %}
                                <i class="fa fa-user"></i>{{ post.author }}
                            {% endif %}
                        </div>
                        <div class="label-card">
                            {% if page.meta %}
                                <i class="fa fa-key"></i>{{ page.meta }}
                            {% endif %}
                        </div>
                        每篇博文的category
                        <div class="label-card">
                            {
                            %
                            include category.html %}
                        </div>
                        每篇博文的tag
                        <div class="label-card">
                            {
                            %
                            include tag.html %}
                        </div>
                    </div>
                    每篇博文的简介
                    <div class="excerpt">
                        {{ post.excerpt }}
                    </div>
                    每篇博文的ReadAll
                    <div class="read-all">
                        <a  href="{{ post.url }}"><i class="fa fa-newspaper-o"></i>Read All</a>
                    </div>
                    <hr>
                  </li>
                {% endfor %}
            </ul>
            -->
            <!-- Pagination links -->
            <div class="pagination">
              {% if paginator.previous_page %}
                <a href="/index.html" class="previous"><i class="fa fa-angle-double-left"></i></a>
                <a href="{{ paginator.previous_page_path }}" class="previous"><i class="fa fa-angle-left"></i></a>
              {% else %}
                <span class="previous disable"><i class="fa fa-angle-double-left"></i></span>
                <span class="previous disable"><i class="fa fa-angle-left"></i></span>
              {% endif %}
              <span class="page_number ">{{ paginator.page }}/{{ paginator.total_pages }}</span>
              {% if paginator.next_page %}
                <a href="{{ paginator.next_page_path }}" class="next"><i class="fa fa-angle-right"></i></a>
                <a href="/page{{ paginator.total_pages }}" class="next"><i class="fa fa-angle-double-right"></i></a>
              {% else %}
                <span class="next disable"><i class="fa fa-angle-right"></i></span>
                <span class="next disable"><i class="fa fa-angle-double-right"></i></span>
              {% endif %}
            </div>
        </div>
    </div>
    <!-- <button class="anchor"><i class="fa fa-anchor"></i></button> -->
    <div class="right">
        <div class="wrap">
            <!-- 隐藏最新文章 -->
            <!--
            <div class="side">
                <div>
                    <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                    最新文章
                </div>
                <ul class="content-ul" recent>
                    {% for post in site.posts offset: 0 limit: 6  %}
                        <li><a href="{{ post.url }}">{{ post.title }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            -->
            <!-- Content -->
            <!--
            <div class="side ">
                <div>
                    <i class="fa fa-th-list"></i>
                    分类目录
                </div>
                <ul class="content-ul" cate>
                    {% for category in site.categories %}
                    <li>
                        <a href="{{ root_url }}/{{ site.category_dir }}#{{ category | first }}" class="categories-list-item" cate="{{ category | first }}">
                            <span class="name">
                                {{ category | first }}
                            </span>
                            <span class="badge">{{ category | last | size }}</span>
                        </a>
                    </li>
                    {% endfor %}
                </ul>
            </div>
            -->
            <!-- 玄玉201805241800：预置各分类文章列表，供首页点击分类时动态显示 -->
            <div class="side ">
                <div>
                    <i class="fa fa-th-list"></i>
                    分类目录
                </div>
                 <ul class="content-ul" cate>
                    <li>
                        <a href="javascript:;" class="categories-list-item" cate="All">
                            <span class="name">
                                所有文章
                            </span>
                            <span class="badge"> {{site.posts | size}}</span>
                        </a>
                    </li>
                    {% for category in site.categories %}
                    <li>
                        <a href="javascript:;" class="categories-list-item" cate="{{ category | first }}">
                            <span class="name">
                                {{ category | first }}
                            </span>
                            <span class="badge">{{ category | last | size }}</span>
                        </a>
                    </li>
                    {% endfor %}
                </ul>
            </div>
            <!-- 其他div框放到这里 -->
            <!--
            <div class="side">
                <div>
                    <i class="fa fa-tags"></i>
                    标签
                </div>
                <div class="tags-cloud">
                    {% assign first = site.tags.first %}
                    {% assign max = first[1].size %}
                    {% assign min = max %}
                    {% for tag in site.tags offset:1 %}
                      {% if tag[1].size > max %}
                        {% assign max = tag[1].size %}
                      {% elsif tag[1].size < min %}
                        {% assign min = tag[1].size %}
                      {% endif %}
                    {% endfor %}

                    {% if max == min %}
                        {% assign diff = 1 %}
                    {% else %}
                        {% assign diff = max | minus: min %}
                    {% endif %}

                    {% for tag in site.tags %}
                      {% assign temp = tag[1].size | minus: min | times: 36 | divided_by: diff %}
                      {% assign base = temp | divided_by: 4 %}
                      {% assign remain = temp | modulo: 4 %}
                      {% if remain == 0 %}
                        {% assign size = base | plus: 9 %}
                      {% elsif remain == 1 or remain == 2 %}
                        {% assign size = base | plus: 9 | append: '.5' %}
                      {% else %}
                        {% assign size = base | plus: 10 %}
                      {% endif %}
                      {% if remain == 0 or remain == 1 %}
                        {% assign color = 9 | minus: base %}
                      {% else %}
                        {% assign color = 8 | minus: base %}
                      {% endif %}
                      <a href="{{ root_url }}/{{ site.tag_dir }}#{{ tag[0] }}" style="font-size: {{ size }}pt; color: #{{ color }}{{ color }}{{ color }};">{{ tag[0] }}</a>
                    {% endfor %}
                </div>
            </div>
            -->

            <!-- <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    Links
                </div>
                <ul  class="content-ul">

                </ul>
            </div> -->
        </div>
    </div>
</div>
<!-- <script src="/js/scroll.min.js" charset="utf-8"></script> -->
<!-- <script src="/js/pageContent.js" charset="utf-8"></script> -->
